<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>hybridMPIC: detector.h Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">hybridMPIC
   </div>
   <div id="projectbrief">A fully relativisitic 2d Particle-In-Cell(PIC) code, with explicit solver, MPI&amp;OpenMP support</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">detector.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef __DETECT</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define __DETECT</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;type.h&quot;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;denfunc.h&quot;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"><a class="line" href="../../d7/d3b/class____Detector.html">    7</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d7/d3b/class____Detector.html">__Detector</a></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;{</div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;        <span class="keywordtype">int</span> id;</div>
<div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="../../d7/d3b/class____Detector.html#af20ae6deadf80e54c7cfa32320267878">   12</a></span>&#160;        <span class="keywordtype">int</span> <a class="code" href="../../d7/d3b/class____Detector.html#af20ae6deadf80e54c7cfa32320267878">species</a>;</div>
<div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="../../d7/d3b/class____Detector.html#ad7b88caef7b358c38883d57f4b6bc49e">   14</a></span>&#160;        <span class="keywordtype">double</span> <a class="code" href="../../d7/d3b/class____Detector.html#ad7b88caef7b358c38883d57f4b6bc49e">delta_t</a>;</div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="../../d7/d3b/class____Detector.html#aaad55e71f49011059a0e76318897b84b">   16</a></span>&#160;        <span class="keywordtype">int</span> <a class="code" href="../../d7/d3b/class____Detector.html#aaad55e71f49011059a0e76318897b84b">if_ek</a> = 0;</div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="../../d7/d3b/class____Detector.html#a02385e95baafe7689317f37f0a6b4be9">   18</a></span>&#160;        <a class="code" href="../../d6/d9c/class____Vect2.html">__Vect2&lt;double&gt;</a> <a class="code" href="../../d7/d3b/class____Detector.html#a02385e95baafe7689317f37f0a6b4be9">ekrange</a>;</div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="../../d7/d3b/class____Detector.html#a455f20e1913a2d8b1085a602774e59aa">   20</a></span>&#160;        <a class="code" href="../../d6/d9c/class____Vect2.html">__Vect2&lt;double&gt;</a> <a class="code" href="../../d7/d3b/class____Detector.html#a455f20e1913a2d8b1085a602774e59aa">xymin</a>;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;        <a class="code" href="../../d6/d9c/class____Vect2.html">__Vect2&lt;double&gt;</a> xymax;</div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="../../d7/d3b/class____Detector.html#aa0afa05a5a829c4dbbc2a1d6a89c380c">   23</a></span>&#160;        <span class="keywordtype">int</span> <a class="code" href="../../d7/d3b/class____Detector.html#aa0afa05a5a829c4dbbc2a1d6a89c380c">front</a>;</div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="../../d7/d3b/class____Detector.html#ab6433e6cc87cc8c8bcec4c62074b57cd">   25</a></span>&#160;        <a class="code" href="../../d6/d9c/class____Vect2.html">__Vect2&lt;double&gt;</a> <a class="code" href="../../d7/d3b/class____Detector.html#ab6433e6cc87cc8c8bcec4c62074b57cd">dxy</a>;</div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="../../d7/d3b/class____Detector.html#a502055dd1b16f61c1779d94f3c711440">   27</a></span>&#160;        <span class="keywordtype">int</span> <a class="code" href="../../d7/d3b/class____Detector.html#a502055dd1b16f61c1779d94f3c711440">dir</a> = 0;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        vector&lt;__Vect2&lt;int&gt; &gt; cell_pos; </div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        <a class="code" href="../../d6/d19/class____Ptclslist.html">__Ptclslist</a> mylist;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <span class="keywordtype">int</span> total;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;        <a class="code" href="../../d7/d3b/class____Detector.html">__Detector</a>(){ total = 0;}</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        <a class="code" href="../../d7/d3b/class____Detector.html">__Detector</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keyword">const</span> <span class="keywordtype">int</span> species, <span class="keyword">const</span> <a class="code" href="../../d6/d9c/class____Vect2.html">__Vect2&lt;double&gt;</a>&amp; ekrange, \</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;                <span class="keyword">const</span> <a class="code" href="../../d6/d9c/class____Vect2.html">__Vect2&lt;double&gt;</a>&amp; xymin, <span class="keyword">const</span> <a class="code" href="../../d6/d9c/class____Vect2.html">__Vect2&lt;double&gt;</a>&amp; xymax, <span class="keyword">const</span> <a class="code" href="../../d6/d9c/class____Vect2.html">__Vect2&lt;double&gt;</a>&amp; dxy)\</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;            :id(<span class="keywordtype">id</span>), <a class="code" href="../../d7/d3b/class____Detector.html#af20ae6deadf80e54c7cfa32320267878">species</a>(species), <a class="code" href="../../d7/d3b/class____Detector.html#a02385e95baafe7689317f37f0a6b4be9">ekrange</a>(ekrange), <a class="code" href="../../d7/d3b/class____Detector.html#a455f20e1913a2d8b1085a602774e59aa">xymin</a>(xymin), xymax(xymax), <a class="code" href="../../d7/d3b/class____Detector.html#ab6433e6cc87cc8c8bcec4c62074b57cd">dxy</a>(dxy){</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;                total = 0;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;            }</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="../../d7/d3b/class____Detector.html#aa39464466ecc5df1380dcefb4eb834d4">init</a>(<a class="code" href="../../d9/d37/class____Simbox.html">__Simbox</a>&amp; mybox);</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="../../d7/d3b/class____Detector.html#a5f965b667d2cb12b09dfc17169e69c34">detect</a>(<a class="code" href="../../d9/d37/class____Simbox.html">__Simbox</a>&amp; mybox);</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        ~<a class="code" href="../../d7/d3b/class____Detector.html">__Detector</a>(){ </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;            mylist.<a class="code" href="../../d6/d19/class____Ptclslist.html#a89bd5130d9b94c556e1f23ccf1a98485">clear</a>();</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;            mylist.<a class="code" href="../../d6/d19/class____Ptclslist.html#a682e2a2543c54e627c6fc3fd42843878">squeeze</a>();</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        }</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keywordtype">void</span> destroy(){</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;            cell_pos.clear();</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;            mylist.<a class="code" href="../../d6/d19/class____Ptclslist.html#a89bd5130d9b94c556e1f23ccf1a98485">clear</a>();</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;            mylist.<a class="code" href="../../d6/d19/class____Ptclslist.html#a682e2a2543c54e627c6fc3fd42843878">squeeze</a>();</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        }</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="../../d7/d3b/class____Detector.html#acbc38f4f00ed309fe9af6e9e96663a18">   52</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="../../d7/d3b/class____Detector.html#acbc38f4f00ed309fe9af6e9e96663a18">reset</a>(){</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;            mylist.<a class="code" href="../../d6/d19/class____Ptclslist.html#a89bd5130d9b94c556e1f23ccf1a98485">clear</a>();</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;            mylist.<a class="code" href="../../d6/d19/class____Ptclslist.html#a682e2a2543c54e627c6fc3fd42843878">squeeze</a>();</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        }</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keywordtype">double</span> <a class="code" href="../../d7/d3b/class____Detector.html#a173e1ab4bdf189c927dc65e9d76b86ff">myy</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>&amp; x);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="../../d7/d3b/class____Detector.html#a90cd5fcc2463b932b78a1a89932fc090">is_near</a>(<span class="keyword">const</span> <a class="code" href="../../d6/d9c/class____Vect2.html">__Vect2&lt;double&gt;</a>&amp; posi);</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keywordtype">void</span> dump(<span class="keyword">const</span> <span class="keywordtype">int</span>&amp; rank, <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; n, <span class="keywordtype">string</span> fname);</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;};</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="../../d7/d3b/class____Detector.html#aa39464466ecc5df1380dcefb4eb834d4">   63</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d7/d3b/class____Detector.html#aa39464466ecc5df1380dcefb4eb834d4">__Detector::init</a>(<a class="code" href="../../d9/d37/class____Simbox.html">__Simbox</a>&amp; mybox)</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;{</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    dir = 1;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    delta_t = mybox.<a class="code" href="../../d9/d37/class____Simbox.html#a401c24180edf0702b647430fdd3fe18d">delta_t</a>;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <a class="code" href="../../d3/dac/class____Cellgroup.html">__Cellgroup</a>&amp; mygroup = mybox.<a class="code" href="../../d9/d37/class____Simbox.html#a5bcfefa55f12a83d66d28b8e23fbd0f4">cellgroup</a>;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; mygroup.<a class="code" href="../../d3/dac/class____Cellgroup.html#aa2e1725d6a24ff12ccdc236d55682a73">member</a>.size(); i ++)</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> j = 0; j &lt; mygroup.<a class="code" href="../../d3/dac/class____Cellgroup.html#aa2e1725d6a24ff12ccdc236d55682a73">member</a>[i].size(); j ++)</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        {</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;            <a class="code" href="../../d2/db1/class____Cellinfo.html">__Cellinfo</a>&amp; mycell = mygroup.<a class="code" href="../../d3/dac/class____Cellgroup.html#aa2e1725d6a24ff12ccdc236d55682a73">member</a>[i][j];</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;            <span class="comment">//__Vect2&lt;int&gt; temp(i, j);</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;            <span class="comment">//cout&lt;&lt;&quot;i, j &quot;&lt;&lt;i&lt;&lt;&quot;\t&quot;&lt;&lt;j&lt;&lt;&quot; myy - y &quot;&lt;&lt;myy(mycell.xymin.member[0]) - mycell.xymin.member[1]&lt;&lt;endl;</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;            <span class="keywordflow">if</span>(<a class="code" href="../../d7/d3b/class____Detector.html#a90cd5fcc2463b932b78a1a89932fc090">is_near</a>(mycell.<a class="code" href="../../d2/db1/class____Cellinfo.html#ae1ea48297c8eeb0d0b622b69555b91cc">xymin</a>))</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;            {</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;                cell_pos.push_back(<a class="code" href="../../d6/d9c/class____Vect2.html">__Vect2&lt;int&gt;</a>(i, j));</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                <span class="comment">//cout&lt;&lt;&quot;cell pushed &quot;&lt;&lt;i&lt;&lt;&quot;\t&quot;&lt;&lt;j&lt;&lt;endl;</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;            }</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            <span class="comment">/***</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="comment">            if(mycell.xymin.member[0] &gt; xymin.member[0])</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="comment">            {</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="comment">                getchar();</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="comment">            }</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="comment">            ***/</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        }</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    }</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <span class="comment">//cout&lt;&lt;cell_pos.size()&lt;&lt;endl;</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;}</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="../../d7/d3b/class____Detector.html#a90cd5fcc2463b932b78a1a89932fc090">   94</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../d7/d3b/class____Detector.html#a90cd5fcc2463b932b78a1a89932fc090">__Detector::is_near</a>(<span class="keyword">const</span> <a class="code" href="../../d6/d9c/class____Vect2.html">__Vect2&lt;double&gt;</a>&amp; posi)</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;{</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="comment">//cout&lt;&lt;&quot;testing &quot;&lt;&lt;posi&lt;&lt;endl;</span></div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordflow">if</span>(!(posi.member[0] &gt; xymin.member[0] - dxy.member[0] &amp;&amp; \</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;                posi.member[0] &lt; xymax.member[0] + dxy.member[0] &amp;&amp; \</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;                posi.member[1] &gt; xymin.member[1] - dxy.member[1] &amp;&amp; \</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                posi.member[1] &lt; xymax.member[1] + dxy.member[1]))</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    {</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="comment">//cout&lt;&lt;&quot; out of range &quot;&lt;&lt;endl;</span></div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    }</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="comment">//cout&lt;&lt;&quot;xymin &quot;&lt;&lt;xymin&lt;&lt;&quot; xymax &quot;&lt;&lt;xymax&lt;&lt;&quot;\t&quot;&lt;&lt;posi&lt;&lt;endl;</span></div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keywordflow">if</span>(abs(posi.member[1 - dir] - <a class="code" href="../../d7/d3b/class____Detector.html#a173e1ab4bdf189c927dc65e9d76b86ff">myy</a>(posi.member[dir])) &lt; 2.0 * dxy.member[0])</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    {</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        <span class="comment">//cout&lt;&lt;&quot; accepted &quot;&lt;&lt;endl;</span></div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    }</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    {</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <span class="comment">//cout&lt;&lt;&quot; too far &quot;&lt;&lt;endl;</span></div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        <span class="comment">//cout&lt;&lt;abs(posi.member[1 - dir] - myy(posi.member[dir]))&lt;&lt;&quot; is the size &quot;&lt;&lt;2.0 * dxy.member[0]&lt;&lt;endl;</span></div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    }</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;}</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="../../d7/d3b/class____Detector.html#a5f965b667d2cb12b09dfc17169e69c34">  123</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d7/d3b/class____Detector.html#a5f965b667d2cb12b09dfc17169e69c34">__Detector::detect</a>(<a class="code" href="../../d9/d37/class____Simbox.html">__Simbox</a>&amp; mybox)</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;{</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; cell_pos.size(); i ++)</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    {</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        <a class="code" href="../../d2/db1/class____Cellinfo.html">__Cellinfo</a>&amp; mycell = mybox.<a class="code" href="../../d9/d37/class____Simbox.html#a5bcfefa55f12a83d66d28b8e23fbd0f4">cellgroup</a>.<a class="code" href="../../d3/dac/class____Cellgroup.html#aa2e1725d6a24ff12ccdc236d55682a73">member</a>[cell_pos[i].member[0]][cell_pos[i].member[1]];</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        <span class="comment">//cout&lt;&lt;&quot; inspecting cell &quot;&lt;&lt;mycell.xymin&lt;&lt;endl;</span></div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <span class="keywordflow">if</span>(mycell.<a class="code" href="../../d2/db1/class____Cellinfo.html#aa99bd863d8cab69486628ed89cc7289f">plist</a>.size() &lt; <a class="code" href="../../d7/d3b/class____Detector.html#af20ae6deadf80e54c7cfa32320267878">species</a>)</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        {</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;            <span class="comment">//cout&lt;&lt;&quot; detect noexsiting species &quot;&lt;&lt;endl;</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        }</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        <span class="keywordflow">if</span>(mycell.<a class="code" href="../../d2/db1/class____Cellinfo.html#aa99bd863d8cab69486628ed89cc7289f">plist</a>[species].size() == 0)</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        {</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;            <span class="comment">//cout&lt;&lt;&quot; current cell empty of species &quot;&lt;&lt;species&lt;&lt;endl;</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;            <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        }</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> j = 0; j &lt; mycell.<a class="code" href="../../d2/db1/class____Cellinfo.html#aa99bd863d8cab69486628ed89cc7289f">plist</a>[<a class="code" href="../../d7/d3b/class____Detector.html#af20ae6deadf80e54c7cfa32320267878">species</a>].size(); j ++)</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        {</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;            <a class="code" href="../../d9/ddf/class____Ptcls.html">__Ptcls</a>&amp; myptcl = mycell.<a class="code" href="../../d2/db1/class____Cellinfo.html#aa99bd863d8cab69486628ed89cc7289f">plist</a>[<a class="code" href="../../d7/d3b/class____Detector.html#af20ae6deadf80e54c7cfa32320267878">species</a>].member[j];</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;            <span class="keywordflow">if</span>((<a class="code" href="../../d7/d3b/class____Detector.html#a173e1ab4bdf189c927dc65e9d76b86ff">myy</a>(myptcl.<a class="code" href="../../d9/ddf/class____Ptcls.html#acb07ae3c6b8df2cfa5dacdf2aa988ee7">position</a>.member[dir]) - myptcl.<a class="code" href="../../d9/ddf/class____Ptcls.html#acb07ae3c6b8df2cfa5dacdf2aa988ee7">position</a>.member[1 - dir]) * \</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;                    (<a class="code" href="../../d7/d3b/class____Detector.html#a173e1ab4bdf189c927dc65e9d76b86ff">myy</a>(myptcl.<a class="code" href="../../d9/ddf/class____Ptcls.html#a39e0e214e5aaedc38625b1d2d3eab80a">old_pos</a>.member[dir]) - myptcl.<a class="code" href="../../d9/ddf/class____Ptcls.html#a39e0e214e5aaedc38625b1d2d3eab80a">old_pos</a>.member[1 - <a class="code" href="../../d7/d3b/class____Detector.html#a502055dd1b16f61c1779d94f3c711440">dir</a>]) &lt;= 0)</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;            {</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                <span class="keywordflow">if</span>(if_ek)</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;                {</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;                    <span class="keywordflow">if</span>(myptcl.<a class="code" href="../../d9/ddf/class____Ptcls.html#ae16bdf32f375a3037b79b977dafb5b29">energy</a> &lt; ekrange.member[1] &amp;&amp; myptcl.<a class="code" href="../../d9/ddf/class____Ptcls.html#ae16bdf32f375a3037b79b977dafb5b29">energy</a> &gt;= ekrange.member[0])</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;                    {</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;                        <span class="comment">//__Ptcls tempptcls = myptcl;</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;                        <span class="comment">//tempptcls.total_id --;</span></div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;                        mylist.<a class="code" href="../../d6/d19/class____Ptclslist.html#a7969ef614256281a5103a4478e009e46">push</a>(myptcl);</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;                    }</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;                }<span class="keywordflow">else</span></div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;                {</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;                    <span class="comment">//__Ptcls tempptcls = myptcl;</span></div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;                    <span class="comment">//tempptcls.total_id --;</span></div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;                    mylist.<a class="code" href="../../d6/d19/class____Ptclslist.html#a7969ef614256281a5103a4478e009e46">push</a>(myptcl);</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;                }</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;            }</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        }</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    }</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; mybox.<a class="code" href="../../d9/d37/class____Simbox.html#a25ca3494d47dc221f0e57e6f6a434992">crossing_bd_ptcls</a>[<a class="code" href="../../d7/d3b/class____Detector.html#af20ae6deadf80e54c7cfa32320267878">species</a>].size(); i ++)</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    {</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        <a class="code" href="../../d9/ddf/class____Ptcls.html">__Ptcls</a>&amp; myptcl = mybox.<a class="code" href="../../d9/d37/class____Simbox.html#a25ca3494d47dc221f0e57e6f6a434992">crossing_bd_ptcls</a>[<a class="code" href="../../d7/d3b/class____Detector.html#af20ae6deadf80e54c7cfa32320267878">species</a>][i];</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        <span class="keywordflow">if</span>((<a class="code" href="../../d7/d3b/class____Detector.html#a173e1ab4bdf189c927dc65e9d76b86ff">myy</a>(myptcl.<a class="code" href="../../d9/ddf/class____Ptcls.html#acb07ae3c6b8df2cfa5dacdf2aa988ee7">position</a>.member[0]) - myptcl.<a class="code" href="../../d9/ddf/class____Ptcls.html#acb07ae3c6b8df2cfa5dacdf2aa988ee7">position</a>.member[1]) * \</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;                (<a class="code" href="../../d7/d3b/class____Detector.html#a173e1ab4bdf189c927dc65e9d76b86ff">myy</a>(myptcl.<a class="code" href="../../d9/ddf/class____Ptcls.html#a39e0e214e5aaedc38625b1d2d3eab80a">old_pos</a>.member[0]) - myptcl.<a class="code" href="../../d9/ddf/class____Ptcls.html#a39e0e214e5aaedc38625b1d2d3eab80a">old_pos</a>.member[0]) &lt;= 0)</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        {</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;            cout&lt;&lt;<span class="stringliteral">&quot;ptcl passing __Detector &quot;</span>&lt;&lt;myptcl.<a class="code" href="../../d9/ddf/class____Ptcls.html#a39e0e214e5aaedc38625b1d2d3eab80a">old_pos</a>&lt;&lt;<span class="stringliteral">&quot;\t&quot;</span>&lt;&lt;myptcl.<a class="code" href="../../d9/ddf/class____Ptcls.html#acb07ae3c6b8df2cfa5dacdf2aa988ee7">position</a>&lt;&lt;endl;</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;            <a class="code" href="../../d9/ddf/class____Ptcls.html">__Ptcls</a> tempptcls = myptcl;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;            tempptcls.<a class="code" href="../../d9/ddf/class____Ptcls.html#ae27fae8bcdf7b0f95d60931480a149d4">total_id</a> --;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;            mylist.<a class="code" href="../../d6/d19/class____Ptclslist.html#a7969ef614256281a5103a4478e009e46">push</a>(myptcl);</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        }</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    }</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;}</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        </div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div>
<div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="../../d7/d3b/class____Detector.html#a173e1ab4bdf189c927dc65e9d76b86ff">  179</a></span>&#160;<span class="keywordtype">double</span> <a class="code" href="../../d7/d3b/class____Detector.html#a173e1ab4bdf189c927dc65e9d76b86ff">__Detector::myy</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>&amp; x)</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;{</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <span class="keywordflow">return</span> x / 80 + 100.0 * UNITS;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <span class="comment">//return 80 * (x - 10.0 * UNITS);</span></div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;}</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;<span class="keywordtype">void</span> __Detector::dump(<span class="keyword">const</span> <span class="keywordtype">int</span>&amp; rank, <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; n, <span class="keywordtype">string</span> fname)</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;{</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    stringstream tempstream;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <span class="keywordtype">string</span> tempint;</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    <span class="keywordflow">if</span>(n &lt; 10){</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        tempstream&lt;&lt;<span class="stringliteral">&quot;0000&quot;</span>;</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    }</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span>(n &lt; 100){</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        tempstream&lt;&lt;<span class="stringliteral">&quot;000&quot;</span>;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(n &lt; 1000){</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        tempstream&lt;&lt;<span class="stringliteral">&quot;00&quot;</span>;</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(n &lt; 10000){</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        tempstream&lt;&lt;<span class="stringliteral">&quot;0&quot;</span>;</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    }</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    tempstream&lt;&lt;n;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    tempstream&lt;&lt;<span class="stringliteral">&quot;_rank_&quot;</span>;</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    tempstream&lt;&lt;rank;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    tempstream&lt;&lt;<span class="stringliteral">&quot;_detector_&quot;</span>;</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    tempstream&lt;&lt;id;</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    tempstream&gt;&gt;tempint;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    fname = fname + tempint;</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    ofstream out;</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    out.open(fname + <span class="stringliteral">&quot;.txt&quot;</span>);</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; mylist.<a class="code" href="../../d6/d19/class____Ptclslist.html#a7feae0ba57fcfc32edaffa105cb1d09c">size</a>(); i ++)</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    {</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;        out&lt;&lt;mylist.<a class="code" href="../../d6/d19/class____Ptclslist.html#abda46652d821fa0b406851572ab9a7a9">member</a>[i]&lt;&lt;endl;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    }</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    out.close();</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    <span class="comment">//mylist.clear();</span></div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <span class="comment">//mylist.squeeze();</span></div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;}</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="class____Detector_html_a02385e95baafe7689317f37f0a6b4be9"><div class="ttname"><a href="../../d7/d3b/class____Detector.html#a02385e95baafe7689317f37f0a6b4be9">__Detector::ekrange</a></div><div class="ttdeci">__Vect2&lt; double &gt; ekrange</div><div class="ttdoc">energy range </div><div class="ttdef"><b>Definition:</b> detector.h:18</div></div>
<div class="ttc" id="class____Vect2_html"><div class="ttname"><a href="../../d6/d9c/class____Vect2.html">__Vect2&lt; double &gt;</a></div></div>
<div class="ttc" id="class____Detector_html_aa0afa05a5a829c4dbbc2a1d6a89c380c"><div class="ttname"><a href="../../d7/d3b/class____Detector.html#aa0afa05a5a829c4dbbc2a1d6a89c380c">__Detector::front</a></div><div class="ttdeci">int front</div><div class="ttdoc">face to which surface </div><div class="ttdef"><b>Definition:</b> detector.h:23</div></div>
<div class="ttc" id="class____Cellinfo_html_aa99bd863d8cab69486628ed89cc7289f"><div class="ttname"><a href="../../d2/db1/class____Cellinfo.html#aa99bd863d8cab69486628ed89cc7289f">__Cellinfo::plist</a></div><div class="ttdeci">vector&lt; __Ptclslist &gt; plist</div><div class="ttdoc">网格中的粒子束 </div><div class="ttdef"><b>Definition:</b> cellinf.h:161</div></div>
<div class="ttc" id="class____Ptcls_html"><div class="ttname"><a href="../../d9/ddf/class____Ptcls.html">__Ptcls</a></div><div class="ttdoc">单个粒子类信息，可以是任何种类粒子 </div><div class="ttdef"><b>Definition:</b> particles.h:9</div></div>
<div class="ttc" id="class____Ptclslist_html_a7feae0ba57fcfc32edaffa105cb1d09c"><div class="ttname"><a href="../../d6/d19/class____Ptclslist.html#a7feae0ba57fcfc32edaffa105cb1d09c">__Ptclslist::size</a></div><div class="ttdeci">int size()</div><div class="ttdoc">返回当前list中粒子个数 </div><div class="ttdef"><b>Definition:</b> particles.h:247</div></div>
<div class="ttc" id="class____Detector_html_a173e1ab4bdf189c927dc65e9d76b86ff"><div class="ttname"><a href="../../d7/d3b/class____Detector.html#a173e1ab4bdf189c927dc65e9d76b86ff">__Detector::myy</a></div><div class="ttdeci">double myy(const double &amp;x)</div><div class="ttdoc">line function of this detector surface </div><div class="ttdef"><b>Definition:</b> detector.h:179</div></div>
<div class="ttc" id="class____Ptcls_html_a39e0e214e5aaedc38625b1d2d3eab80a"><div class="ttname"><a href="../../d9/ddf/class____Ptcls.html#a39e0e214e5aaedc38625b1d2d3eab80a">__Ptcls::old_pos</a></div><div class="ttdeci">__Vect2&lt; double &gt; old_pos</div><div class="ttdoc">前一步的位置 </div><div class="ttdef"><b>Definition:</b> particles.h:66</div></div>
<div class="ttc" id="class____Detector_html_a90cd5fcc2463b932b78a1a89932fc090"><div class="ttname"><a href="../../d7/d3b/class____Detector.html#a90cd5fcc2463b932b78a1a89932fc090">__Detector::is_near</a></div><div class="ttdeci">int is_near(const __Vect2&lt; double &gt; &amp;posi)</div><div class="ttdoc">return -1, 0, 1 3 types of near, 0: far, -1: near under, 1: near above </div><div class="ttdef"><b>Definition:</b> detector.h:94</div></div>
<div class="ttc" id="class____Detector_html_a5f965b667d2cb12b09dfc17169e69c34"><div class="ttname"><a href="../../d7/d3b/class____Detector.html#a5f965b667d2cb12b09dfc17169e69c34">__Detector::detect</a></div><div class="ttdeci">void detect(__Simbox &amp;mybox)</div><div class="ttdoc">perform a detection </div><div class="ttdef"><b>Definition:</b> detector.h:123</div></div>
<div class="ttc" id="class____Cellgroup_html_aa2e1725d6a24ff12ccdc236d55682a73"><div class="ttname"><a href="../../d3/dac/class____Cellgroup.html#aa2e1725d6a24ff12ccdc236d55682a73">__Cellgroup::member</a></div><div class="ttdeci">vector&lt; vector&lt; __Cellinfo &gt; &gt; member</div><div class="ttdoc">cellinfo 数据 </div><div class="ttdef"><b>Definition:</b> cellinf.h:631</div></div>
<div class="ttc" id="class____Ptclslist_html"><div class="ttname"><a href="../../d6/d19/class____Ptclslist.html">__Ptclslist</a></div><div class="ttdoc">一个同类粒子的粒子束，隶属于一个网格，也可以不是 </div><div class="ttdef"><b>Definition:</b> particles.h:182</div></div>
<div class="ttc" id="class____Ptcls_html_ae16bdf32f375a3037b79b977dafb5b29"><div class="ttname"><a href="../../d9/ddf/class____Ptcls.html#ae16bdf32f375a3037b79b977dafb5b29">__Ptcls::energy</a></div><div class="ttdeci">double energy</div><div class="ttdoc">粒子能量，没有乘以权重 </div><div class="ttdef"><b>Definition:</b> particles.h:78</div></div>
<div class="ttc" id="class____Ptclslist_html_a682e2a2543c54e627c6fc3fd42843878"><div class="ttname"><a href="../../d6/d19/class____Ptclslist.html#a682e2a2543c54e627c6fc3fd42843878">__Ptclslist::squeeze</a></div><div class="ttdeci">void squeeze()</div><div class="ttdoc">压缩空间 </div><div class="ttdef"><b>Definition:</b> particles.h:203</div></div>
<div class="ttc" id="class____Detector_html_af20ae6deadf80e54c7cfa32320267878"><div class="ttname"><a href="../../d7/d3b/class____Detector.html#af20ae6deadf80e54c7cfa32320267878">__Detector::species</a></div><div class="ttdeci">int species</div><div class="ttdoc">capture which kind of particles </div><div class="ttdef"><b>Definition:</b> detector.h:12</div></div>
<div class="ttc" id="class____Simbox_html_a401c24180edf0702b647430fdd3fe18d"><div class="ttname"><a href="../../d9/d37/class____Simbox.html#a401c24180edf0702b647430fdd3fe18d">__Simbox::delta_t</a></div><div class="ttdeci">double delta_t</div><div class="ttdoc">dt 根据网格宽度和Corant 条件算出 </div><div class="ttdef"><b>Definition:</b> simbox.h:88</div></div>
<div class="ttc" id="class____Detector_html_aa39464466ecc5df1380dcefb4eb834d4"><div class="ttname"><a href="../../d7/d3b/class____Detector.html#aa39464466ecc5df1380dcefb4eb834d4">__Detector::init</a></div><div class="ttdeci">void init(__Simbox &amp;mybox)</div><div class="ttdoc">initialize the simbox </div><div class="ttdef"><b>Definition:</b> detector.h:63</div></div>
<div class="ttc" id="class____Simbox_html_a5bcfefa55f12a83d66d28b8e23fbd0f4"><div class="ttname"><a href="../../d9/d37/class____Simbox.html#a5bcfefa55f12a83d66d28b8e23fbd0f4">__Simbox::cellgroup</a></div><div class="ttdeci">__Cellgroup cellgroup</div><div class="ttdoc">当前box中的所有网格的二维数组，通过指标可以直接访问 </div><div class="ttdef"><b>Definition:</b> simbox.h:125</div></div>
<div class="ttc" id="class____Detector_html_ab6433e6cc87cc8c8bcec4c62074b57cd"><div class="ttname"><a href="../../d7/d3b/class____Detector.html#ab6433e6cc87cc8c8bcec4c62074b57cd">__Detector::dxy</a></div><div class="ttdeci">__Vect2&lt; double &gt; dxy</div><div class="ttdoc">deltax of cell </div><div class="ttdef"><b>Definition:</b> detector.h:25</div></div>
<div class="ttc" id="class____Ptcls_html_acb07ae3c6b8df2cfa5dacdf2aa988ee7"><div class="ttname"><a href="../../d9/ddf/class____Ptcls.html#acb07ae3c6b8df2cfa5dacdf2aa988ee7">__Ptcls::position</a></div><div class="ttdeci">__Vect2&lt; double &gt; position</div><div class="ttdoc">粒子坐标,全局绝对 </div><div class="ttdef"><b>Definition:</b> particles.h:64</div></div>
<div class="ttc" id="class____Ptclslist_html_a89bd5130d9b94c556e1f23ccf1a98485"><div class="ttname"><a href="../../d6/d19/class____Ptclslist.html#a89bd5130d9b94c556e1f23ccf1a98485">__Ptclslist::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdoc">清除当前list </div><div class="ttdef"><b>Definition:</b> particles.h:241</div></div>
<div class="ttc" id="class____Ptclslist_html_abda46652d821fa0b406851572ab9a7a9"><div class="ttname"><a href="../../d6/d19/class____Ptclslist.html#abda46652d821fa0b406851572ab9a7a9">__Ptclslist::member</a></div><div class="ttdeci">vector&lt; __Ptcls &gt; member</div><div class="ttdoc">粒子类成员 </div><div class="ttdef"><b>Definition:</b> particles.h:185</div></div>
<div class="ttc" id="class____Cellinfo_html_ae1ea48297c8eeb0d0b622b69555b91cc"><div class="ttname"><a href="../../d2/db1/class____Cellinfo.html#ae1ea48297c8eeb0d0b622b69555b91cc">__Cellinfo::xymin</a></div><div class="ttdeci">__Vect2&lt; double &gt; xymin</div><div class="ttdoc">网格左下角坐标 </div><div class="ttdef"><b>Definition:</b> cellinf.h:157</div></div>
<div class="ttc" id="class____Ptcls_html_ae27fae8bcdf7b0f95d60931480a149d4"><div class="ttname"><a href="../../d9/ddf/class____Ptcls.html#ae27fae8bcdf7b0f95d60931480a149d4">__Ptcls::total_id</a></div><div class="ttdeci">static long total_id</div><div class="ttdoc">current max id </div><div class="ttdef"><b>Definition:</b> particles.h:56</div></div>
<div class="ttc" id="class____Detector_html_ad7b88caef7b358c38883d57f4b6bc49e"><div class="ttname"><a href="../../d7/d3b/class____Detector.html#ad7b88caef7b358c38883d57f4b6bc49e">__Detector::delta_t</a></div><div class="ttdeci">double delta_t</div><div class="ttdoc">time step of simualtion </div><div class="ttdef"><b>Definition:</b> detector.h:14</div></div>
<div class="ttc" id="class____Detector_html_a455f20e1913a2d8b1085a602774e59aa"><div class="ttname"><a href="../../d7/d3b/class____Detector.html#a455f20e1913a2d8b1085a602774e59aa">__Detector::xymin</a></div><div class="ttdeci">__Vect2&lt; double &gt; xymin</div><div class="ttdoc">spatial domain of detector box </div><div class="ttdef"><b>Definition:</b> detector.h:20</div></div>
<div class="ttc" id="class____Detector_html_a502055dd1b16f61c1779d94f3c711440"><div class="ttname"><a href="../../d7/d3b/class____Detector.html#a502055dd1b16f61c1779d94f3c711440">__Detector::dir</a></div><div class="ttdeci">int dir</div><div class="ttdoc">along x, or y </div><div class="ttdef"><b>Definition:</b> detector.h:27</div></div>
<div class="ttc" id="class____Cellgroup_html"><div class="ttname"><a href="../../d3/dac/class____Cellgroup.html">__Cellgroup</a></div><div class="ttdoc">网格二维数组群，来表征一个box内的cell信息，cell是其内部的member </div><div class="ttdef"><b>Definition:</b> cellinf.h:600</div></div>
<div class="ttc" id="class____Detector_html_acbc38f4f00ed309fe9af6e9e96663a18"><div class="ttname"><a href="../../d7/d3b/class____Detector.html#acbc38f4f00ed309fe9af6e9e96663a18">__Detector::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdoc">reset the detector </div><div class="ttdef"><b>Definition:</b> detector.h:52</div></div>
<div class="ttc" id="class____Detector_html_aaad55e71f49011059a0e76318897b84b"><div class="ttname"><a href="../../d7/d3b/class____Detector.html#aaad55e71f49011059a0e76318897b84b">__Detector::if_ek</a></div><div class="ttdeci">int if_ek</div><div class="ttdoc">if detect by energy range </div><div class="ttdef"><b>Definition:</b> detector.h:16</div></div>
<div class="ttc" id="class____Detector_html"><div class="ttname"><a href="../../d7/d3b/class____Detector.html">__Detector</a></div><div class="ttdoc">detect particle information by some paramters, can set the detector position, size and energy detecti...</div><div class="ttdef"><b>Definition:</b> detector.h:7</div></div>
<div class="ttc" id="class____Simbox_html_a25ca3494d47dc221f0e57e6f6a434992"><div class="ttname"><a href="../../d9/d37/class____Simbox.html#a25ca3494d47dc221f0e57e6f6a434992">__Simbox::crossing_bd_ptcls</a></div><div class="ttdeci">vector&lt; vector&lt; __Ptcls &gt; &gt; crossing_bd_ptcls</div><div class="ttdoc">存储越界粒子，当前box中所有越过母网格的粒子，是个vector，包含所有类别的粒子 </div><div class="ttdef"><b>Definition:</b> simbox.h:120</div></div>
<div class="ttc" id="class____Cellinfo_html"><div class="ttname"><a href="../../d2/db1/class____Cellinfo.html">__Cellinfo</a></div><div class="ttdoc">单个cell内部信息，包括场和粒子两部分 </div><div class="ttdef"><b>Definition:</b> cellinf.h:151</div></div>
<div class="ttc" id="class____Ptclslist_html_a7969ef614256281a5103a4478e009e46"><div class="ttname"><a href="../../d6/d19/class____Ptclslist.html#a7969ef614256281a5103a4478e009e46">__Ptclslist::push</a></div><div class="ttdeci">void push(const __Ptcls &amp;other)</div><div class="ttdoc">将一个粒子压入当前list </div><div class="ttdef"><b>Definition:</b> particles.h:216</div></div>
<div class="ttc" id="class____Simbox_html"><div class="ttname"><a href="../../d9/d37/class____Simbox.html">__Simbox</a></div><div class="ttdoc">初始化一个模拟盒子，这个模拟盒子包含cell信息，粒子信息，场信息。粒子种类信息也在这里。 ...</div><div class="ttdef"><b>Definition:</b> simbox.h:51</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jun 16 2015 22:48:37 for hybridMPIC by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
